<html class="hb-loaded">
<head>
 <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
 <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
 <meta content="yes" name="apple-mobile-web-app-capable" />
 <meta content="black" name="apple-mobile-web-app-status-bar-style" />
 <meta content="telephone=no" name="format-detection" />
 <meta content="email=no" name="format-detection" />
 <title>宝宝生鲜</title>

 <script src="js/jquery.min.js"></script>
 <script src="js/bootstrap.min.js"></script>
 <link rel="stylesheet" href="css/bootstrap.min.css" />
 <link rel="stylesheet" href="css/public.v20150930.css" />
 <script src="js/ygop.ajax.client.js"></script>
 <script src="js/Common.v150812.js"></script>
 <script src="js/layer.m.js"></script>
 <link rel="stylesheet" href="css/layer.css" />
 <script src="js/jweixin-1.0.0.js" type="text/javascript"></script>
 <link rel="stylesheet" href="css/gps.css" />

</head>
<body>
<script src="js/swiper.min.js"></script>
<script src="js/Common.js"></script>
<link rel="stylesheet" href="css/home.css" />
<script type="text/javascript" src="js/jquery.lazyload.min.js"></script>
<header class="header">
 <div class="clearfix">
  <em class="icon icon_logo"> </em>
  <a class="positionwrap"> <em class="icon icon_position"> </em> <em id="emName">上海</em> </a>
 </div>
</header>
<div class="wrap">
 <div style="background:#eee;" class="swiper-container swiper-container-horizontal">
  <div id="divImgList" class="swiper-wrapper"
       style="transition-duration: 0ms; transform: translate3d(-540px, 0px, 0px);">
   <div class="swiper-slide swiper-slide-prev" style="height:275px"  style="width: 540px;">

    <a href="/index.html"> <img
            class="swiper-lazy swiper-lazy-loaded" id="picFirst0"
            src="/images/8,6a7f8abd-6215-4f07-8eaa-30c46d3cdc74.jpg"></a></div>
   <div class="swiper-slide swiper-slide-active"  style="height:275px" style="width: 540px;">
    <a href="/index.html"> <img
            class="swiper-lazy swiper-lazy-loaded" id="picFirst1"
            src="/images/8,40948bcd-5aa1-4bde-8bf0-f08a7ecea449.jpg"></a></div>
   <div class="swiper-slide swiper-slide-next" style="height:275px" style="width: 540px;">
    <a href="/index.html"> <img
            class="swiper-lazy swiper-lazy-loaded" id="picFirst2"
            src="/images/8,2ba46e39-96d5-4b59-a928-508c7a4af729.jpg"></a></div>
   <div class="swiper-slide" style="height:275px"  style="width: 540px;">
    <a href="/index.html"> <img
            class="swiper-lazy swiper-lazy-loaded" id="picFirst3"
            src="/images/8,965c7986-aee4-418f-b527-4fbf993d1ac1.jpg"></a></div>
   <div class="swiper-slide"  style="height:275px" style="width: 540px;" >
    <a href="/index.html"> <img
            class="swiper-lazy swiper-lazy-loaded" id="picFirst4"
            src="/images/8,a7b8696c-7188-4daa-a4d4-0c0c24448a0e.jpg"></a></div>
   <div class="swiper-slide" style="height:275px"  style="width: 540px;">
    <a> <img
            class="swiper-lazy swiper-lazy-loaded" id="picFirst5"
            src="/images/8,ad61c865-9e94-4ff9-a244-a4720fc16bc8.jpg"></a></div>
  </div>
  <!-- Add Pagination -->
 </div>
 <div id="divOtherBanner">
  <!--===homve nav===-->
  <ul class="homenav clearfix">
   <li> <a href="/products/appxinpin.html"> <span class="icon_homenav icon_homenav1"> 新品尝鲜 </span> <span class="words"> 新品尝鲜 </span> </a></li>
   <li> <a href="member_order.html"> <span class="icon_homenav icon_homenav2"> 订单查询 </span> <span class="words"> 订单查询 </span> </a></li>
   <li> <a href="/index.html"> <span class="icon_homenav icon_homenav3"> 水果精选 </span> <span class="words"> 水果精选 </span> </a></li>
   <li> <a href="/mycoupon"> <span class="icon_homenav icon_homenav4"> 优惠券 </span> <span class="words"> 优惠券 </span> </a></li>
  </ul>
  <!--===限时抢购===-->
  <div class="qiang">
   <p id="divLimtTimeText" class="tt"><span class=" f16"> 限时抢购 </span> 04:51:22</p>
   <ul id="div1" class="qiang_ul clearfix mt8">
    <li><a href="/product/48633.html"> <img data-original="images/8,6e002a11-c985-460f-b7ea-0132e411ae27.jpg" src="images/8,6e002a11-c985-460f-b7ea-0132e411ae27.jpg" title="" alt="" style="display: block;" /></a></li>
    <li><a href="/product/12654.html"> <img data-original="images/8,9126cce7-b9d4-4bfb-94cf-917bbff40662.jpg" src="images/8,9126cce7-b9d4-4bfb-94cf-917bbff40662.jpg" title="" alt="" style="display: block;" /></a></li>
    <li><a href="/product/11007.html"> <img data-original="images/8,56e504c4-8fc1-4e22-aabd-71788f855441.jpg" src="images/8,56e504c4-8fc1-4e22-aabd-71788f855441.jpg" title="" alt="" style="display: block;" /></a></li>
   </ul>
  </div>
  <!--===banner links===-->
  <div id="div2" class="banner homeitems">
   <a href="/index.html"><img data-original="images/8,b0763b15-924d-4f8c-a998-81127f50dddf.jpg" src="images/8,b0763b15-924d-4f8c-a998-81127f50dddf.jpg" style="display: inline;" /></a>
  </div>
  <!--===天天买===-->
  <div class="homeitems">
   <p id="title3" class="homett blue">超值买</p>
   <ul id="div3" class="advcol2 clearfix">
    <li class="oneimg"> <a href="/index.html"> <img data-original="images/8,e66b572f-766d-4d57-a29d-b683a9b32f27.jpg" src="images/8,e66b572f-766d-4d57-a29d-b683a9b32f27.jpg" style="height: 260px; display: inline;" /> </a> </li>
    <li class="twoimg"><a href="/index.html"><img data-original="images/8,064b1a2c-8dbd-47af-8c65-4fa89bab1494.jpg" src="images/8,064b1a2c-8dbd-47af-8c65-4fa89bab1494.jpg" style="display: inline;" /></a><a href="/index.html"><img data-original="images/8,c54a9057-e3be-4a34-8dc8-0d7b3100ef7c.jpg" src="images/8,c54a9057-e3be-4a34-8dc8-0d7b3100ef7c.jpg" style="display: inline;" /> </a></li>
   </ul>
  </div>
  <!--===鲜首发===-->
  <div class="homeitems">
   <p id="title4" class="homett golden">鲜首发</p>
   <ul id="div4" class="advcol2 clearfix">
    <li class="twoimg"><a href="/index.html"> <img data-original="images/8,7ae335e4-5230-4021-a183-733b885225e3.jpg" src="images/8,7ae335e4-5230-4021-a183-733b885225e3.jpg" style="display: inline;" /> </a><a href="/index.html"> <img data-original="images/8,cf4155ff-e8ca-40cd-b0ed-d4975c5ca3c6.jpg" src="images/8,cf4155ff-e8ca-40cd-b0ed-d4975c5ca3c6.jpg" style="display: inline;" /> </a></li>
    <li class="oneimg"> <a href="/index.html"><img data-original="images/8,fbb6bf20-4b0a-4bb9-a488-190a358f98c9.jpg" src="images/8,fbb6bf20-4b0a-4bb9-a488-190a358f98c9.jpg" style="height: 260px; display: inline;" /></a></li>
   </ul>
  </div>
  <!--===超值买===-->
  <div class="homeitems">
   <p id="title5" class="homett green">食会购</p>
   <ul id="div5" class="advcol2 clearfix">
    <li class="oneimg"> <a href="/index.html"> <img data-original="images/8,77a63d9e-f705-4e19-9b98-4d4eb58823f1.jpg" src="images/8,77a63d9e-f705-4e19-9b98-4d4eb58823f1.jpg" style="height: 260px; display: inline;" /> </a> </li>
    <li class="twoimg"><a href="/index.html"><img data-original="images/8,8ba3b27c-21d6-41ee-a0d7-fa455e283f5e.jpg" src="images/8,8ba3b27c-21d6-41ee-a0d7-fa455e283f5e.jpg" style="display: inline;" /></a><a href="/index.html"><img data-original="images/8,8b113218-a4ba-4d81-bde4-ddc3e2022a83.jpg" src="images/8,8b113218-a4ba-4d81-bde4-ddc3e2022a83.jpg" style="display: inline;" /> </a></li>
   </ul>
  </div>
  <!--===人气爆款===-->
  <div class="homeitems">
   <p id="title6" class="homett orange">人气爆款</p>
   <div id="div6" class="banner2">
    <a href="/product/12846.html"><img data-original="images/8,c2b3488d-72d5-4ada-9f29-33d07d3cc009.jpg" src="images/8,c2b3488d-72d5-4ada-9f29-33d07d3cc009.jpg" style="display: inline;" /></a>
    <a href="/product/50218.html"><img data-original="images/8,90b455d9-cbd0-43fa-ab1f-f51700050fa0.jpg" src="images/8,90b455d9-cbd0-43fa-ab1f-f51700050fa0.jpg" style="display: inline;" /></a>
    <a href="/product/10588.html"><img data-original="images/8,32f5817d-e48d-4958-9824-6d8f57b96963.jpg" src="images/8,32f5817d-e48d-4958-9824-6d8f57b96963.jpg" style="display: inline;" /></a>
    <a href="/product/12025.html"><img data-original="images/8,06de19c6-6124-47c9-b4f3-1be474aa3afc.jpg" src="images/8,06de19c6-6124-47c9-b4f3-1be474aa3afc.jpg" style="display: inline;" /></a>
    <a href="/product/10096.html"><img data-original="images/8,7dd1bb88-47b7-491e-84c2-71815b348a43.jpg" src="images/8,7dd1bb88-47b7-491e-84c2-71815b348a43.jpg" style="display: inline;" /></a>
    <a href="/product/426353.html"><img data-original="images/8,22526635-d35b-440c-b1a1-0d3ec365203c.jpg" src="images/8,22526635-d35b-440c-b1a1-0d3ec365203c.jpg" style="display: inline;" /></a>
    <a href="/product/152273.html"><img data-original="images/8,6693deea-45f5-4cae-8dd5-57a7d40e584b.jpg" src="images/8,6693deea-45f5-4cae-8dd5-57a7d40e584b.jpg" style="display: inline;" /></a>
    <a href="/product/156202.html"><img data-original="images/8,80c0d8c4-0e5e-4e57-a2fe-4586a7c0c9f6.jpg" src="images/8,80c0d8c4-0e5e-4e57-a2fe-4586a7c0c9f6.jpg" style="display: inline;" /></a>
   </div>
  </div>
 </div>
</div>
<a id="loadApp" class="icon appdownloadfix_home"> </a>
<script type="text/javascript">
 //倒计时设置
 var interval = 1000;
 var leftsecond = 0;
 function ShowCountDown() {
  var a = 0;
  var b = 1;
  var c = a.toString() + b.toString();
  if (leftsecond > 0) {
   var day1 = Math.floor(leftsecond / (60 * 60 * 24));
   var hour = Math.floor((leftsecond - day1 * 24 * 60 * 60) / 3600);
   var minute = Math.floor((leftsecond - day1 * 24 * 60 * 60 - hour * 3600) / 60);
   var second = Math.floor(leftsecond - day1 * 24 * 60 * 60 - hour * 3600 - minute * 60);
   hour = hour < 10 ? "0" + hour.toString() : hour.toString();
   minute = minute < 10 ? "0" + minute.toString() : minute.toString();
   second = second < 10 ? "0" + second.toString() : second.toString();
   var html = '<span class=" f16"> 限时抢购 </span>  ' + hour + ":" + minute + ":" + second;
   $("#divLimtTimeText").html(html);
  }
  else {
   $("#divLimtTimeText").html("");
  }
 }
 window.setInterval(function () {
  leftsecond = leftsecond - 1;
  ShowCountDown(leftsecond, 'divdown1');
 }, interval);

 $(function () {
  //显示城市
//        showSelectedCity();
//
//        //加载功能按钮图标
//        loadOperate();
//
//        //下载app
//        AppLoadOperate();
//
//        //获取首页数据
//        getMallData();
 })

 //操作事件
 function loadOperate() {
  //跳转到选择城市列表页面
  $(".positionwrap").click(function () {
   window.location.href = 'city.html';
  });
 }

 //首页有些图片设置高度
 function resizeimg() {
  $(".oneimg").each(function () {
   var height_big = $(this).siblings(".twoimg").height();
   $(this).find("img").css("height", String(height_big) + "px");
  })
 }

 //设置首页轮播图片高度
 function resizesliderheight() {
  var window_w = $(window).width();
  var height_slider;
  if (window_w < 540) {
   height_slider = window_w * 246 / 640;
  } else {
   height_slider = 275;
  }
  return height_slider;
 }

 //获取首页数据
 function getMallData() {
//        YgmJsCommon.popups.loading();
 }

 //加载Banners,轮播图片
 function loadBanners() {
  //初始化轮播插件
  var swiper = new Swiper('.swiper-container', {
   autoplay: 4000,//可选选项，自动滑动
   pagination: '.swiper-pagination',
   lazyLoading: true,
   autoplayDisableOnInteraction: false,
   loop: true,
  });
 }

 //加载限时抢购
 function loadGroup1(data) {
//        leftsecond = data.Group1.CountdownSeconds;
//        if (leftsecond != null && leftsecond != undefined && leftsecond != "") {
//            ShowCountDown();
//        }
//        var html = "";
//        var list = data.Group1.Banners;
//        if (list && list.length > 0) {
//            for (var i = 0; i < list.length; i++) {
//                var linkUrl = GetLinkUrl(list[i]);
//                if (linkUrl != "") {
//                    html += ' <li><a href="' + linkUrl + '">';
//                }
//                else {
//                    html += ' <li><a>';
//                }
//                html += ' <img alt="" title="" src="images/240-250.png" data-original="' + list[i].PictureUrl + '" >';
//                html += '</a></li>';
//            }
//        }
//        $("#div1").html(html);
 }

 //加载腰线
 function loadGroup2(data) {
  var html = "";
  var list = data.Group2.Banners;
  if (list && list.length > 0) {
   for (var i = 0; i < list.length; i++) {
    var linkUrl = GetLinkUrl(list[i]);
    if (linkUrl != "") {
     html += '<a href="' + linkUrl + '"><img src="images/760-200.png" data-original="' + list[i].PictureUrl + '"></a>';
    }
   }
  }
  $("#div2").html(html);
 }

 //加载超值买
 function loadGroup3(data) {
  var html = "";
  $("#title3").html(data.Group3.GroupTitle);
  var list = data.Group3.Banners;
  if (list && list.length > 0) {
   html += ' <li class="oneimg"> <a href="' + GetLinkUrl(list[0]) + '"> <img src="images/370-382.png" data-original="' + list[0].PictureUrl + '"> </a> </li>';
   html += '<li class="twoimg"><a href="' + GetLinkUrl(list[1]) + '"><img src="images/im_home_t_loading.png" data-original="' + list[1].PictureUrl + '"></a>';
   html += '<a href="' + GetLinkUrl(list[2]) + '"><img src="images/im_home_t_loading.png" data-original="' + list[2].PictureUrl + '"> </a></li>';
  }
  $("#div3").html(html);
 }

 //加载鲜首发
 function loadGroup4(data) {
  var html = "";
  $("#title4").html(data.Group4.GroupTitle);
  var list = data.Group4.Banners;
  if (list && list.length > 0) {
   html += ' <li class="twoimg">';
   html += '<a href="' + GetLinkUrl(list[0]) + '"> <img src="images/im_home_t_loading.png" data-original="' + list[0].PictureUrl + '"> </a>';
   html += '<a href="' + GetLinkUrl(list[2]) + '"> <img src="images/im_home_t_loading.png" data-original="' + list[2].PictureUrl + '"> </a>';
   html += '</li><li class="oneimg">';
   html += ' <a href="' + GetLinkUrl(list[1]) + '"><img src="images/370-382.png" data-original="' + list[1].PictureUrl + '"></a></li>';
  }
  $("#div4").html(html);
 }

 //食会购
 function loadGroup5(data) {
  var html = "";
  $("#title5").html(data.Group5.GroupTitle);
  var list = data.Group5.Banners;
  if (list && list.length > 0) {
   html += '<li class="oneimg"> <a href="' + GetLinkUrl(list[0]) + '"> <img src="images/370-382.png" data-original="' + list[0].PictureUrl + '"> </a> </li>';
   html += '<li class="twoimg"><a href="' + GetLinkUrl(list[1]) + '"><img src="images/im_home_t_loading.png" data-original="' + list[1].PictureUrl + '"></a>';
   html += '<a href="' + GetLinkUrl(list[2]) + '"><img src="images/im_home_t_loading.png" data-original="' + list[2].PictureUrl + '"> </a></li>';
  }
  $("#div5").html(html);
 }

 //人气爆款
 function loadGroup6(data) {
  var html = "";
  $("#title6").html(data.Group6.GroupTitle);
  var list = data.Group6.Banners;
  if (list && list.length > 0) {
   for (var i = 0; i < list.length; i++) {
    var linkUrl = GetLinkUrl(list[i]);
    if (linkUrl != "") {
     html += '<a href="' + linkUrl + '"><img src="images/760-202.png" data-original="' + list[i].PictureUrl + '"/></a>';
    }
   }
  }
  $("#div6").html(html);
 }

 //返回LinkUrl
 function GetLinkUrl(obj) {
  var linkUrl = "";
  if (obj && obj != undefined && obj != "") {
   if (obj.LinkUrl == "") {
    return linkUrl;
   }
   var type = obj.LinkType;
   switch (type) {
    case 1://商品详情
     linkUrl = "/product/" + obj.LinkCode + ".html";
     break;
    case 2://商品分类列表
     linkUrl = "/products/" + obj.LinkCode + ".html";
     break;
    case 3://链接其他活动页面
     linkUrl = obj.LinkUrl;
     break;
    case 4://搜索关键字页面
     linkUrl = "/ksearch/" + obj.LinkCode;
     break;
    default: linkUrl = "/product/" + obj.LinkCode + ".html";
     break;
   }
  }
  return linkUrl;
 }

 //显示被选中的城市,默认显示上海
 function showSelectedCity() {
  var objCity = YgmJsCommon.getCityCookie();
  if (objCity != null) {
   var name = decodeURIComponent(objCity.Name);
   $("#emName").html(name);
  }
 }
</script>
<footer class="footer">
 <a class="current" href="index.html" id="index"><span class="home">首页</span>首页</a>
 <a href="cat.html" id="category"><span class="catalog">分类</span>分类</a>
 <a href="cart.html" id="cart"> <span class="shopping">购物车<font id="fCartProductTotalCount" class="badge" style="display: none;"></font></span>购物车 </a>
 <a href="member_index.html" id="my"><span class="my">我的易果</span>我的易果</a>
</footer>
<div data-backdrop="static" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="divMyCity" class="modal" style="display: none;">
 <div role="document" class="modal-dialog">
  <div id="divCityContent" class="modal-content">
   <div style=" display:block;" class="gpstips">
    <a> <em class=" icon icon_gps"> </em> 亲，请先选择您的收货城市 <em class=" icon icon_arrowright"> </em> </a>
   </div>
  </div>
 </div>
</div>
<script type="text/javascript">

 $(function () {
  loadBanners();
 })

 function myShare() {
  wx.ready(function () {
   //分享朋友圈
   wx.onMenuShareTimeline({
    title: _wx_JsConfig.title,
    desc: _wx_JsConfig.content, // 分享描述
    link: _wx_JsConfig.timeLineLink,
    imgUrl: _wx_JsConfig.imgUrl,
    trigger: function (res) {
    },
    success: function (res) {
     dplus.track("分享到朋友圈");
    },
    cancel: function (res) {
    },
    fail: function (res) {
    }
   });
   //分享朋友
   wx.onMenuShareAppMessage({
    title: _wx_JsConfig.title,
    desc: _wx_JsConfig.content,
    link: _wx_JsConfig.timeLineLink,
    imgUrl: _wx_JsConfig.imgUrl,
    trigger: function (res) {
    },
    success: function (res) {
     dplus.track("分享给朋友");
    },
    cancel: function (res) {
    },
    fail: function (res) {
    }
   });
  });

 }

 //如果查询到CityCookie default=1，表示用户没有选择过城市，则需要弹出选择城市
 function showSelectedCityDialog() {
  var objCity = YgmJsCommon.getCityCookie();
  if (objCity != null && objCity.Default == 1) {
   $("#divMyCity").css('display', "");
   $("#divMyCity").modal('show');
   $("#divMyCity").click(function () {
    window.location.href = "/Home/SelectCity";
   })
  }
  else {
   $("#divMyCity").css('display', "none");
  }
 }

 //返回商品数量显示在footer上
 function getCartCount() {
//            var count = YgmJsCommon.getCartProductsTotalCount();
//            if (count > 0) {
//                $("#fCartProductTotalCount").css("display", "");
//                $("#fCartProductTotalCount").html(count);
//            }
//            else {
//                $("#fCartProductTotalCount").css("display", "none");
//            }
//            return count;
 }

 //设置云朵的位置
 $('#divMyCity').on('shown.bs.modal', function () {
  var win_width = $(this).find(".modal-dialog").width();
  var win_height = $(this).find(".modal-dialog").height();
  $(this).find(".modal-dialog").css({ "marginTop": String(-1 * win_height / 2) + "px", "marginLeft": String(-1 * win_width / 2) + "px" });

 });

</script>
</body>
</html>